package com.itheima.tanhua.base.common;

/**
 * @Author YangJiaHao
 * @Date 2023/1/29 16:18
 * Threadlocal  不同账号的TL不同，登录时存入用户id，可以快速取出
 */
public class BaseContext {
    private static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(String id) {
        threadLocal.set(id);
    }

    public static String getCurrentId() {
        return threadLocal.get();
    }
}